package hlhj.fhp.checkpoint.utils

import android.content.Context

/**
 * Created by Never Fear   on 2018\11\13 0013.
Never More....
 */
object SPHelper {
    val TOKEN_TAG="token"

    fun saveToken(c:Context,token:String){
        val sharedPreferences = c.getSharedPreferences(TOKEN_TAG, Context.MODE_PRIVATE)
        val edit = sharedPreferences.edit()
        edit.putString("token",token)
        edit.apply()
    }

    fun getToken(c:Context): String? {
        val sharedPreferences = c.getSharedPreferences(TOKEN_TAG, Context.MODE_PRIVATE)
        return sharedPreferences.getString("token","")
    }
}